home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Technical Documentation / Sample Code / DTS.Lib & Samples / Zippo / Start.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-22  |  1.6 KB  |  69 lines  |  [TEXT/MPS ]

  1. /*
  2. ** Apple Macintosh Developer Technical Support
  3. **
  4. ** File:        Start.c
  5. ** Written by:    Eric Soldan
  6. **
  7. ** Copyright © 1989-1991 Apple Computer, Inc.
  8. ** All rights reserved.
  9. */
  10.  
  11.  
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16.  
  17. #include "App.h"            /* Get the application includes/typedefs, etc.    */
  18. #include "App.Common.h"        /* Get the stuff in common with rez.            */
  19. #include "App.protos.h"        /* Get the prototypes for application.            */
  20.  
  21. #ifndef __TOOLUTILS__
  22. #include <ToolUtils.h>
  23. #endif
  24.  
  25.  
  26.  
  27. /*****************************************************************************/
  28.  
  29.  
  30.  
  31. #ifndef THINK_C
  32. extern void _DataInit();
  33. #endif
  34.  
  35.  
  36.  
  37. /*****************************************************************************/
  38. /*****************************************************************************/
  39.  
  40.  
  41.  
  42. #pragma segment Main
  43. void    main(void)
  44. {
  45.  
  46. #ifndef THINK_C
  47.     UnloadSeg((Ptr)_DataInit);        /* Note that _DataInit can't be in Main! */
  48. #endif
  49.  
  50.     SetApplLimit(GetApplLimit() - 16384);
  51.         /* This decreases the application heap by 16k, which in turn
  52.         ** increases the stack by 16k. */
  53.  
  54.     MaxApplZone();                    /* Expand the heap so code segments load at the top. */
  55.  
  56.     Initialize(1, kMinHeap, kMinSpace, nil, nil);    /* Initialize the program. */
  57.     DoSetResCursor(watchCursor);                    /* Rest of startup may take a while. */
  58.     InitRequiredAppleEvents();
  59.     DoAdjustMenus();
  60.     StartDocuments();                        /* Open (or print) designated documents. */
  61.  
  62.     UnloadSeg((Ptr)Initialize);        /* Initialize can't be in Main! */
  63.     EventLoop();                    /* Call the main event loop. */
  64.     ExitToShell();                    /* Quit the application. */
  65. }
  66.  
  67.  
  68.  
  69.